package jerry.html.events;

import java.util.List;

import jerry.html.LogParser;

/**
 * 
 * Player event
 * 
 * 
 * @author (h0t@_G0|i
 * 
 */
public class PlayerEvtCapImpl extends EvtCap {

	public EvtCap subEvent;
	public PlayerEvtCapImpl(List<String> list) {
		try {
			subEvent = (EvtCap)Class.forName(
					LogParser.classes.getString(list.get(1) + "." + list.get(2)))
					.getConstructors()[0].newInstance(list);
			validEvt = true;
		}
		catch (Exception e) {
			validEvt = false;
		}
	}
	
	@Override
	public boolean isEvtValid() {
		return validEvt && subEvent.validEvt;
	}
}
